package ve.ejb.entity;

import ve.ejb.metadata.Comparator;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author memozac
 */
@Entity
public class ComparatorDimensionalCut implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long idComparatorDimensionalCut;

    @ManyToOne
    @JoinColumn(name="idComparator",nullable=false,updatable=true)
    private Comparator comparator;

    @ManyToOne
    @JoinColumn(name="idDimensionalCut",nullable=false,updatable=true)
    private DimensionalCut dimensionalCut;

    @Temporal(value = TemporalType.TIMESTAMP) private Date registerDate;

    private Double register;

    public Long getIdComparatorDimensionalCut() {
        return idComparatorDimensionalCut;
    }

    public Double getRegister() {
        return register;
    }

    public void setRegister(Double register) {
        this.register = register;
    }

    public Date getRegisterDate() {
        return registerDate;
    }

    public void setRegisterDate(Date registerDate) {
        this.registerDate = registerDate;
    }

    public Comparator getComparator() {
        return comparator;
    }

    public void setComparator(Comparator comparator) {
        this.comparator = comparator;
    }

    public DimensionalCut getDimensionalCut() {
        return dimensionalCut;
    }

    public void setDimensionalCut(DimensionalCut dimensionalCut) {
        this.dimensionalCut = dimensionalCut;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idComparatorDimensionalCut != null ? idComparatorDimensionalCut.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        if (!(object instanceof ComparatorDimensionalCut)) {
            return false;
        }
        ComparatorDimensionalCut other = (ComparatorDimensionalCut) object;
        if ((this.idComparatorDimensionalCut == null && other.idComparatorDimensionalCut != null) || (this.idComparatorDimensionalCut != null && !this.idComparatorDimensionalCut.equals(other.idComparatorDimensionalCut))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "bsc.ejb.entity.ComparatorDimensionalCut[id=" + idComparatorDimensionalCut + "]";
    }

}//ends of class
